package org.test.cloud.stream.rocketmq.consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.function.Consumer;

@Component
public class MessageConsumerService {

    private static final Logger LOGGER = LoggerFactory.getLogger(MessageConsumerService.class);

    @Bean
    Consumer<String> streamConsumer() {
        return message -> LOGGER.info("Received message: {}", message);
    }
}
